﻿using System.Collections.Generic;
using System.Linq;
using VideoSeller.Business.Data;

namespace VideoSeller.Business.Models
{
	public class TeamDocsModel : Repository<TeamDoc>
	{
		public void DeleteAll(IEnumerable<TeamDoc> items)
		{
			foreach (var item in items)
			{
				var oncat = Table.SingleOrDefault(x => x.Id == item.Id);

				if (oncat != null)
				{
					Table.DeleteOnSubmit(oncat);
				}
			}

			SubmitAllChanges();
		}
	}
}